package com.base.component.ai.system.entity;

import java.util.List;

import com.base.component.ai.system.converter.ListFlowConverterEditor;
import com.base.component.ai.workflow.flow.Flow;
import com.base.core.framework.sql.entity.BaseV1Ext;
import com.base.core.head.converter.ListStringConverterEditor;
import com.gitee.magic.core.converter.PropertyConverter;
import com.gitee.magic.core.json.JsonObject;
import com.gitee.magic.jdbc.persistence.annotation.Entity;
import com.gitee.magic.jdbc.persistence.annotation.Table;
import com.gitee.magic.jdbc.persistence.source.jdbc.script.annotations.ColumnDef;
import com.gitee.magic.jdbc.persistence.source.jdbc.script.annotations.Indexes;
import com.gitee.magic.jdbc.persistence.source.jdbc.script.annotations.ScriptConverter;
import com.gitee.magic.jdbc.persistence.source.jdbc.script.annotations.TableDef;
import com.gitee.magic.jdbc.persistence.source.jdbc.script.annotations.indexes.Normal;
import com.gitee.magic.jdbc.persistence.source.jdbc.script.converter.FieldMediumText;

import lombok.Getter;
import lombok.Setter;
import lombok.ToString;

/**
 * @author zywei 
 * @date 2025-01-11 11:56:16
 */
@Getter@Setter@ToString
@Entity("flowRun")
@Table("sys_flow_run")
@TableDef(comment = "flow运行")
public class FlowRunDO extends BaseV1Ext {

	private static final long serialVersionUID = 1L;
	
	public FlowRunDO(){}

    @ColumnDef(indexes = @Indexes(normal = @Normal), comment = "Flow配置Id")
	private Long flowConfigureId;

    @PropertyConverter(ListStringConverterEditor.class)
    @ColumnDef(comment = "输入参数")
    private List<String> inputParams;

    @ScriptConverter(FieldMediumText.class)
    @PropertyConverter(ListFlowConverterEditor.class)
    @ColumnDef(comment = "第一步")
	private List<Flow> nexts;

    @ColumnDef(comment = "输入")
	private JsonObject inputs;

}
